package com.sss.hloster0505;

import java.util.Scanner;

public class ThreadTestDriver {

	public static void main(String[] args) {

	}

	private static void test02() {
		// 创建一个线程对象
		Thread th1 = new MyThread();
		th1.start();
        System.out.println("如果希望停止执行，请输入   s    ");
        Scanner sc=new Scanner(System.in);
        String strStopped=sc.next();
        if(strStopped.trim().equalsIgnoreCase("s")) {
        	((MyThread)th1).setStopped(true);
        }
	}
}
